/*
 * @lc app=leetcode.cn id=762 lang=javascript
 *
 * [762] 二进制表示中质数个计算置位
 */

// @lc code=start
/**
 * @param {number} L
 * @param {number} R
 * @return {number}
 */
var countPrimeSetBits = function(L, R) {
    let res=[2,3,5,7,11,13,17,19]
    let count=0
    while(L<=R){
        let count_1=0
        let temp=L.toString(2)
        for(let i=0;i<temp.length;i++){
            if(temp[i]==1)count_1++
        }
        if(res.includes(count_1))count++
        L++
    }
    return count
};
// @lc code=end

